home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIX Base Documentation 1998 November
/
IRIX 6.5.2 Base Documentation November 1998.img
/
usr
/
share
/
catman
/
p_man
/
cat3
/
complib
/
cscalm1d.z
/
cscalm1d
Wrap
Text File
|
1998-10-30
|
7KB
|
133 lines
ccccssssccccaaaallllmmmm1111dddd,,,,zzzzssssccccaaaallllmmmm1111dddd((((3333FFFF)))) ccccssssccccaaaallllmmmm1111dddd,,,,zzzzssssccccaaaallllmmmm1111dddd((((3333FFFF))))
NNNNAAAAMMMMEEEE
ccccssssccccaaaallllmmmm1111dddd,,,, zzzzssssccccaaaallllmmmm1111dddd ---- scales Multiple 1D complex sequences.
SSSSYYYYNNNNOOOOPPPPSSSSYYYYSSSS
_F_o_r_t_r_a_n :
ssssuuuubbbbrrrroooouuuuttttiiiinnnneeee ccccssssccccaaaallllmmmm1111dddd(((( nnnn,,,, pppp,,,, aaaallllpppphhhhaaaa,,,, aaaarrrrrrrraaaayyyy,,,, iiiinnnncccc,,,, llllddddaaaa))))
iiiinnnntttteeeeggggeeeerrrr nnnn,,,, pppp,,,, iiiinnnncccc,,,, llllddddaaaa
rrrreeeeaaaallll aaaallllpppphhhhaaaa
ccccoooommmmpppplllleeeexxxx aaaarrrrrrrraaaayyyy((((llllddddaaaa,,,,pppp))))
ssssuuuubbbbrrrroooouuuuttttiiiinnnneeee zzzzssssccccaaaallllmmmm1111dddd(((( ssssiiiiggggnnnn,,,, nnnn,,,, pppp,,,, aaaarrrrrrrraaaayyyy,,,, iiiinnnncccc,,,, llllddddaaaa))))
iiiinnnntttteeeeggggeeeerrrr nnnn,,,, pppp,,,, iiiinnnncccc,,,, llllddddaaaa
rrrreeeeaaaallll****8888 aaaallllpppphhhhaaaa
ddddoooouuuubbbblllleeee ccccoooommmmpppplllleeeexxxx aaaarrrrrrrraaaayyyy((((llllddddaaaa,,,,pppp))))
_C :
####iiiinnnncccclllluuuuddddeeee <<<<fffffffftttt....hhhh>>>>
iiiinnnntttt ccccssssccccaaaallllmmmm1111dddd (((( iiiinnnntttt nnnn,,,, iiiinnnntttt pppp,,,, ffffllllooooaaaatttt aaaallllpppphhhhaaaa,,,, ccccoooommmmpppplllleeeexxxx ****aaaarrrrrrrraaaayyyy,,,,
iiiinnnntttt iiiinnnncccc,,,, iiiinnnntttt llllddddaaaa))));;;;
iiiinnnntttt zzzzssssccccaaaallllmmmm1111dddd (((( iiiinnnntttt nnnn,,,, iiiinnnntttt pppp,,,, ddddoooouuuubbbblllleeee aaaallllpppphhhhaaaa,,,, zzzzoooommmmpppplllleeeexxxx ****aaaarrrrrrrraaaayyyy,,,,
iiiinnnntttt iiiinnnncccc,,,, iiiinnnntttt llllddddaaaa))));;;;
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
ccccssssccccaaaallllmmmm1111dddd and zzzzssssccccaaaallllmmmm1111dddd scale the P complex sequences of N samples each.
The Fourier Transforms are not normalized so the succession Direct-
Inverse transform scales the input data by a factor equal to the size of
the transform. ccccssssccccaaaallllmmmm1111dddd or zzzzssssccccaaaallllmmmm1111dddd are used to scale back the result.
PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
NNNN ---- Integer, the number of samples in each sequence.
Unchanged on exit.
PPPP ---- Integer, the number of sequences. Unchanged on exit.
AAAAllllpppphhhhaaaa ---- scaling floating point value. Unchanged on exit.
AAAARRRRRRRRAAAAYYYY ---- Array containing the samples of the sequence to be scaled (in
place).
IIIINNNNCCCC ---- Integer, increment between two consecutive elements of a sequence.
Unchanged on exit.
LLLLDDDDAAAA ---- Integer, leading dimension: increment between the first samples of
two consecutive sequences. Unchanged on exit.
EEEExxxxaaaammmmpppplllleeee ooooffff CCCCaaaalllllllliiiinnnngggg SSSSeeeeqqqquuuueeeennnncccceeee
Working on 64 sequences of 1024 complex values each. We successively
apply a Direct Fourier Transform, an Inverse Fourier Trasnform and
finally scale back the result by a factor 1/N (1/1024.)-
This sequence DirectFFT-InverseFFT-Scaling is equivalent to the identity
operator and the final sequence should be equal (with round-off
PPPPaaaaggggeeee 1111
ccccssssccccaaaallllmmmm1111dddd,,,,zzzzssssccccaaaallllmmmm1111dddd((((3333FFFF)))) ccccssssccccaaaallllmmmm1111dddd,,,,zzzzssssccccaaaallllmmmm1111dddd((((3333FFFF))))
precision) to the initial sequence.
Elements of each sequence are stored with increment (stride) 1, and the
offset between the first element of two succesive sequence (leading
dimension) is 2049.
FFFFoooorrrrttttrrrraaaannnn ::::
complex array(0:2049-1,0:64-1), coeff(1024+15)
call cfftm1di( 1024, coeff)
call cfftm1d( -1, 1024, 64, array, 1, 2049, coeff)
call cfftm1d( 1, 1024, 64, array, 1, 2049, coeff)
call cscalm1d(1024,64,(1./real(1024)),array,1,2049)
CCCC ::::
#include <fft.h>
complex array[64*2049], *coeff;
coeff = cfftm1di( 1024, NULL);
cfftm1d( -1, 1024, 64, array, 1, 2049, coeff);
cfftm1d( 1, 1024, 64, array, 1, 2049, coeff);
cscalm1d( 1024, 64, 1./(float)1024, array, 1, 2049);
NNNNOOOOTTTTEEEE____1111 :::: The Direct and Inverse transforms should use opposite signs -
Which one is used (+1 or -1) for Direct transform is just a matter of
convention-
NNNNOOOOTTTTEEEE____2222 :::: The Fourier Transforms are not normalized so the succession
Direct-Inverse transform scales the input data by a factor equal to the
size of the transform.
SSSSEEEEEEEE AAAALLLLSSSSOOOO
fft, cfftm1di, zfftm1di, cfftm1d, zfftm1d, cprodm1d, zprodm1d
PPPPaaaaggggeeee 2222